class Main extends egret.DisplayObjectContainer {
    private show:boolean=false;
    private n:number=0;
    public constructor() {
        super();
        this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this);
    }
    private onAddToStage(event: egret.Event) {
        new Register();
        this.stage.addChild(Loading.self);
        EventHelper.addListener(SysCmd.CONFIG_COMPLETE,this.createGame,this);
        EventHelper.call(SysCmd.LOAD_CONFIG);
        
    }
    private createGame() {
        // let lm:LayerMgr=new LayerMgr();
        // this.addChild(lm);
        
        this.stage.addEventListener(egret.TouchEvent.TOUCH_TAP,this.click,this);
    }
    private click(e:egret.TouchEvent){
        if(!this.show)DialogMgr.show("    hello dialog,hello dialog,hello dialog,hello dialog,hello dialog,hello"+this.n);
        this.show=!this.show;
        this.n++;
    }
}